import React,{useEffect, useState} from 'react'

export default function Dong2() {
    const [state,setState]=useState({
        a:{
            b:1
        }
    })
    useEffect(()=>{
        setTimeout(()=>{
            state.a.b=2
            setState(state)
        },2000)
    },[])
  return (
    <h1>我是Dong2组件{state.a.b}</h1>
  )
}
